<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>
            <div>333</div>
        </li>
        <li>2</li>
        <li>3</li>
        <li>4</li>

    </ul>
    <script>
        let ul = document.querySelector('ul')
        let li = document.querySelectorAll('li')
        // li.forEach(function(item){//浪费内存
        //     item.addEventListener('click',function(){
        //         console.log(item.innerHTML)
        //     })
        // })
        ul.addEventListener('click',function(e){ 
            console.log(e)//获取到的点击的li内的内容
        })

    </script>
</body>
</html>